import {Component, OnInit} from '@angular/core';
import {Employee} from "./employee";
import {EmployeesService} from "./employee.service";

@Component({
  moduleId: module.id,
  selector: 'employee-table',
  templateUrl: 'employee.component.html'
})
export class EmployeesComponent implements OnInit {
  employees: Employee[];

  constructor(private employeeService: EmployeesService) {
  }

  ngOnInit(): void {
    this.employeeService.getAllEmployees().then(response => this.employees = response);
  }

}
